﻿using System;
using System.Diagnostics;
using IDesktop.Core;

namespace IDesktop.Test {
    class Program {
        static void Main(string[] args) {

            //Weather weather = new Weather("http://www.weather.com.cn/data/listinfo/city{0}.xml", "", "");
            //Stopwatch watch = new Stopwatch();
            //watch.Start();
            //weather.GetLocation();
            //watch.Stop();
            //Console.WriteLine(watch.ElapsedMilliseconds);

            //weather.Sava();

            //string content = "{\"weatherinfo\":{\"city\":\"上海\",\"cityid\":\"101020100\",\"temp1\":\"18℃\",\"temp2\":\"23℃\",\"weather\":\"多云转晴\",\"img1\":\"n1.gif\",\"img2\":\"d0.gif\",\"ptime\":\"18:00\"}}";

            //Regex regex = new Regex(@"\{[^{}]*}");

            //Match match = regex.Match(content);
            //string tmp = match.Groups[0].ToString();


            Weather weather = new Weather("", "", "http://m.weather.com.cn/data/{0}.html");
            Stopwatch watch = new Stopwatch();
            watch.Start();
            FutureWeatherInfo info = weather.GetFutureWeather("101010100", "北京");
            watch.Stop();
            Console.WriteLine(watch.ElapsedMilliseconds);
        }
    }
}
